<?php

	session_start();
	$which=$_POST['which'];
include('system/db/conn.php');

	if($which==0){
	$bid=$_POST['bid'];
	$menueName=$_POST['menueName'];
	$menueNum=$_POST['menueNum'];
	$sid=$_POST['sid'];
	

$sql = "INSERT INTO do_supplier_location_menu(supplier_location_id,name,price,cate_id)VALUES($sid,'$menueName','$menueNum',$bid)";


if(mysql_query($sql,$conn)){
	print_r("插入成功");
}


}elseif ($which==1) {
	$menueid=$_POST['menueid'];

$sql = "delete from do_supplier_location_menu where id=".$menueid;


if(mysql_query($sql,$conn)){
	print_r("删除成功");
}
}elseif($which==2){
     $menueid=$_POST['menueid'];
     $menueName=$_POST['menueName'];
     $menuePrice=$_POST['menuePrice'];
$sql = "update do_supplier_location_menu set name='$menueName',price='$menuePrice' where id=".$menueid;

if(mysql_query($sql,$conn)){
	print_r("修改成功");
}



}


?>